home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
WarriorsProgress.sit
/
Warrior’s Progress
/
source code
/
Source
/
Libraries
/
Idle
/
Periodic.h
< prev
next >
Wrap
Text File
|
1997-06-28
|
613b
|
39 lines
// Periodic.h
#ifndef Periodic_h
#define Periodic_h
#ifndef Enableable_h
#include "Enableable.h"
#endif
#ifndef DelayedMethod_h
#include "DelayedMethod.h"
#endif
class Periodic: public Enableable
{
private:
const Method& toRepeat;
DelayedMethod< Periodic > repeat;
uint32 period;
Tick nextTime;
bool inProgress;
void Repeat();
virtual void BeEnabled();
virtual void BeDisabled();
public:
Periodic( const Method&,
uint32 period,
bool startEnabled = true );
uint32 Period() const { return period; }
void SetPeriod( uint32 );
void Synchronize();
};
#endif